<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2019/3/24
  Time: 22:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="css/mui.css" rel="stylesheet" />
    <style type="text/css">
        .tab-content{
            margin-top: 30px;
        }
    </style>

    <script>
        function getid() {
            var userid = sessionStorage.getItem('userid');
            return userid;
        }
    </script>
</head>

<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    ${name}揽件 <small>${address}</small>
                </h1>
            </div>
            <nav class="navbar navbar-default" role="navigation">
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <form class="navbar-form navbar-left" role="search" method="post" action="/selectExpressByAddress.html">
                        <div class="form-group">
                            <select  class="form-control" name="e_address">
                                <option value="">请选择</option><br>
                                <optgroup label="北苑">
                                    <option value="北苑一号公寓楼">北苑一号公寓楼</option><br>
                                    <option value="北苑二号公寓楼">北苑二号公寓楼</option><br>
                                    <option value="北苑三号公寓楼">北苑三号公寓楼</option><br>
                                    <option value="北苑四号公寓楼">北苑四号公寓楼</option><br>
                                    <option value="北苑五号公寓楼">北苑五号公寓楼</option><br>
                                    <option value="北苑六号公寓楼">北苑六号公寓楼</option><br>
                                    <option value="北苑七号公寓楼">北苑七号公寓楼</option><br>
                                </optgroup>
                                <optgroup label="南苑">
                                    <option value="南苑一号公寓楼">南苑一号公寓楼</option><br>
                                    <option value="南苑二号公寓楼">南苑二号公寓楼</option><br>
                                    <option value="南苑三号公寓楼">南苑三号公寓楼</option><br>
                                    <option value="南苑四号公寓楼">南苑四号公寓楼</option><br>
                                    <option value="南苑五号公寓楼">南苑五号公寓楼</option><br>
                                    <option value="南苑六号公寓楼">南苑六号公寓楼</option><br>
                                    <option value="南苑七号公寓楼">南苑七号公寓楼</option><br>
                                    <option value="南苑八号公寓楼">南苑八号公寓楼</option><br>
                                    <option value="南苑九号公寓楼">南苑九号公寓楼</option><br>
                                    <option value="南苑十号公寓楼">南苑十号公寓楼</option><br>
                                    <option value="南苑十一公寓楼">南苑十一公寓楼</option><br>
                                    <option value="南苑十二公寓楼">南苑十二公寓楼</option><br>
                                </optgroup>
                            </select>
                            <input hidden="hidden" name="esc" value=${name}>
                        </div>
                        <button type="submit" class="btn btn-default" value=${name}>查看</button>
                        <a href="<%=path%>/jsp/Home.jsp">返回大厅</a>
                        <a href="<%=path%>/jsp/loginAndRegister.jsp">退出登录</a>
                    </form>
                </div>
            </nav>
            <div class="tab-content">
                <table class="table">
                    <thead>
                    <tr>
                        <th>快递号</th>
                        <th>快递类型</th>
                        <th>收件人地址</th>
                        <th>发布时间</th>
                        <th>状态</th>
                        <th>揽件</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${list}" var="item">
                        <tr>
                            <td>${item.e_number}</td>
                            <td>${item.e_esc}</td>
                            <td>${item.e_address}</td>
                            <td>${item.e_time}</td>
                            <td>${item.e_status}</td>
                            <td><a href="/expressPiece.html?number=${item.e_number}">揽件</a></td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
                <%--<script>--%>
                    <%--function myFunction(){--%>
                        <%--var string="揽件成功！详细信息如下：\n";--%>
                        <%--var stringCode="取货码："+${detailExpress.e_code};--%>
                        <%--var stringEsc="\n快递类型："+${detailExpress.e_esc};--%>
                        <%--var stringName="\n收件人姓名"+${detailExpress.e_addressee};--%>
                        <%--var stringTellnum="\n收件人电话"+${detailExpress.e_tellnumber};--%>
                        <%--var stringAddress="\n收件人地址"+${detailExpress.e_address};--%>
                        <%--alert(string+stringCode+stringEsc+stringName+stringTellnum+stringAddress);--%>
                    <%--}--%>
                <%--</script>--%>
            </div>
        </div>
    </div>
</div>
</body>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="<%=path%>/js/index.js"></script>
</html>
